package Dao

import (
	"fmt"
	"github.com/jinzhu/gorm"
	"log"
)

type DatabaseMysql struct {
	Db *gorm.DB
}

var Databasemysql DatabaseMysql

func InitDatabase()  {
	db, errMysql := gorm.Open("mysql", "docker_user:peng1275960183@(139.155.69.249:3307)/go_use?charset=utf8mb4&parseTime=True&loc=Local")
	Databasemysql.Db = db
	if errMysql != nil {
		log.Fatal("gorm.Open err", errMysql)
		return
	}
	fmt.Println("Mysql connext suss")
}


